package com.ironman.mes.web;

import lombok.extern.slf4j.Slf4j;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Get;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.hotplug.PluginManager;

@Slf4j
@Controller
@Mapping("/plugin")
public class PluginManagerController {

    /**
     * @param name ee tcl
     * @return
     */
    @Get
    @Mapping("/start")
    public String hello(String name) {
        PluginManager.start(name);
        return "ok";
    }

    @Get
    @Mapping("/stop")
    public String stop(String name) {
        PluginManager.stop(name);
        return "ok";
    }

}